<template>
<div id="Shenghuohui">
  <el-dialog title="导入全部用户及登录IP" :visible.sync="importVisible" width="600px" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
    <el-row>
      <el-col>
        <el-upload class="upload-demo" :before-upload="beforeAvatarUpload" :on-success="getImportList" name="file" :file-list="fileList"
            :action="this.$http.defaults.baseURL + 'shhuser/upload'" with-credentials :on-error='uploaderror' style="margin:20px auto" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" multiple>
          <el-button type="success" icon="el-icon-document" style="margin:0 auto">导入数据</el-button>
        </el-upload>
      </el-col>
    </el-row>
  </el-dialog>
  <el-dialog title="设置用户登录IP" :visible.sync="ipVisible" width="600px" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
    <el-form :model="ipForm" label-width="100px" ref="ipForm" style="padding:10px 0 0;clear:both" :rules="ipFormRules">
      <el-row>
        <el-col>
          <el-form-item prop="username" label="登录名">
            <el-input v-model.trim="ipForm.username" style="width:300px" placeholder="请输入用户的登录名"></el-input>
          </el-form-item>
          <el-form-item prop="ip" label="登录IP">
            <el-input v-model.trim="ipForm.ip" style="width:300px" placeholder="请输入用户的登录IP"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="success" @click.native="ipFormSubmit()" :loading="saveLoading">确定</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
  <el-dialog title="重置用户密码" :visible.sync="passVisible" width="550px" top="20px" :close-on-click-modal="false" :close-on-press-escape="false">
    <el-form :model="passForm" label-width="200px" ref="passForm" :inline="true" style="padding:10px 0 0;clear:both" :rules="passFormRules">
      <el-row>
        <el-col>
          <el-form-item prop="username">
            <el-input v-model.trim="passForm.username" style="width:250px" placeholder="请输入要重置密码用户的登录名"></el-input>
            <el-button type="success" @click.native="passFormSubmit()" style="margin-left:20px;" :loading="saveLoading">密码重置为123456</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
  <div id="shenghuohuiIndex">
    <el-breadcrumb separator=">">
      <el-breadcrumb-item :to="{ path: '/' }">系统首页</el-breadcrumb-item>
      <el-breadcrumb-item>民主生活会</el-breadcrumb-item>
    </el-breadcrumb>
    <section class="wboxs" v-if="inRoles('ROLE_shhadmin') || inRoles('ROLE_admin')">
      <el-select v-model="theYear" @change="getShh">
        <el-option :value="null" label="全部" />
        <el-option v-for="(item,index) in yearList" :key="'year'+index" :value="item" :label="item" />
      </el-select>
      <!-- <div id="editswitch" v-if="isAdmin" style="float:left"><el-switch v-model="editVisible" active-color="#13ce66" inactive-color="#ff4949" :change="editBtnsShow()"></el-switch> <span>编辑</span></div> -->
      <el-button v-show="editBtnsVisible" type="success" @click="handleAdd" icon="el-icon-plus" style="margin:10px">新增</el-button>
      <el-button v-show="editBtnsVisible" type="primary" @click="handleAuth" icon="el-icon-user" style="margin:10px;color:#fff">授权</el-button>
      <!-- <el-dropdown v-if="inRoles('ROLE_shhadmin')" split-button type="primary" @click="setUserPass"> -->
      <!-- 只有生活会管理员和被授管理权限且为监督处的用户才有此按钮 -->
      <el-dropdown split-button type="primary" @click="setUserPass" v-if="inRoles('ROLE_shhadmin')" style="margin:10px">
        重置用户密码
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item @click.native="setAllUserPass">全部用户批量重置密码</el-dropdown-item>
          <el-dropdown-item @click.native="setUserIp" :loading="saveLoading">设置用户登录IP</el-dropdown-item>
          <el-dropdown-item @click.native="exportAllUserIp">导出全部用户及登录IP</el-dropdown-item>
          <el-dropdown-item @click.native="importAllUserIp">导入全部用户及登录IP</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </section>
    <section class="wboxs" v-else-if="shhAuth==2&&unitName === '干部监督处'">
      <!-- 只有生活会管理员和被授管理权限且为监督处的用户才有此按钮 -->
      <el-dropdown split-button type="primary" @click="setUserPass" style="margin:10px">
        重置用户密码
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item @click.native="setAllUserPass">全部用户批量重置密码</el-dropdown-item>
          <el-dropdown-item @click.native="setUserIp" :loading="saveLoading">设置用户登录IP</el-dropdown-item>
          <el-dropdown-item @click.native="exportAllUserIp">导出全部用户及登录IP</el-dropdown-item>
          <el-dropdown-item @click.native="importAllUserIp">导入全部用户及登录IP</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </section>
    <section class="wboxd" style="margin-top:10px">
      <el-table :data="shhlist" highlight-current-row v-loading="listLoading" style="width: 100%;" :height="tableHeight" border>
        <el-table-column type="index" label="序号" width="70" align="center">
        </el-table-column>
        <el-table-column prop="theYear" label="年度" width="120" align="center">
        </el-table-column>
        <el-table-column prop="name" label="标题">
        </el-table-column>
        <el-table-column label="状态" width="100" align="center">
          <template slot-scope="scope">
            <template v-if="parseInt(scope.row.theYear)>=2021">
              <template v-if="inRoles('ROLE_shhadmin') || inRoles('ROLE_admin')">
                <el-tag style="margin:10px 0" v-if="scope.row.status===0">未初始化</el-tag>
                <el-tag style="cursor:pointer;margin:10px 0" v-else-if="scope.row.status===1" type="success" effect="dark" title="点击关闭该生活会" @click="setState(scope.row.id,2)">已启动</el-tag>
                <el-tag style="cursor:pointer;margin:10px 0" v-else-if="scope.row.status===2" type="info" effect="dark" title="点击开启该生活会" @click="setState(scope.row.id,1)">已关闭</el-tag>
              </template>
              <template v-else>
                <el-tag style="margin:10px 0" v-if="scope.row.status===0">未初始化</el-tag>
                <el-tag style="margin:10px 0" v-else-if="scope.row.status===1" type="success" effect="dark">已启动</el-tag>
                <el-tag style="cursor:pointer;margin:10px 0" v-else-if="scope.row.status===2" type="info" effect="dark">已关闭</el-tag>
              </template>
            </template>
            <div v-else style="height:52px" />
          </template>
        </el-table-column>
        <el-table-column label="操作" width="500">
          <template slot-scope="scope">
            <template v-if="parseInt(scope.row.theYear)>=2021">
              <el-button size="small" v-if="scope.row.status!==0" @click="shhshow(scope.row.id, scope.row.theYear)">进入</el-button>
              <span v-show="editBtnsVisible" ref="EditBtns" style="margin:10px 10px 10px 0" v-if="inRoles('ROLE_shhadmin') || inRoles('ROLE_admin')">
                <el-button size="small" v-if="scope.row.status===0" @click="handleStart(scope.row.id,1)" type="success" :loading="btnLoading">初始化并开启</el-button>
                <el-button size="small" v-if="scope.row.status===0" @click="handleEdit(scope.row.id)" type="primary" :loading="btnLoading">修改</el-button>
                <el-button type="danger" v-if="scope.row.status===0" size="small" @click="handleDel(scope.row.id)" :loading="btnLoading">删除</el-button>
              </span>
            </template>
            <template v-else>
              <el-button size="small" @click="shhshowold(scope.row.id,  scope.row.theYear)">进入</el-button>
            </template>
          </template>
        </el-table-column>
      </el-table>
      <!--新增界面-->
      <el-dialog title="新增生活会" :visible.sync="addFormVisible">
        <el-form :model="addForm" label-width="80px" :rules="addFormRules" ref="addForm">
          <el-form-item label="标题" prop="Name">
            <el-input v-model="addForm.Name" auto-complete="off" style="width:300px;"></el-input>
          </el-form-item>
          <el-form-item label="年度" prop="TheYear">
            <el-select v-model="addForm.TheYear" placeholder="请选择" style="width:100px;">
              <el-option v-for="index of 10" :label="2020+index" :key="'add'+(2020+index)" :value="2020+index"></el-option>
            </el-select>
            <!-- <el-date-picker v-model="addForm.TheYear" type="year" placeholder="选择年度" format="yyyy" value-format="yyyy"></el-date-picker> -->
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click.native="addFormVisible = false">取消</el-button>
          <el-button type="primary" @click.native="addFormSubmit" :loading="addLoading">提交</el-button>
        </div>
      </el-dialog>
      <!--修改界面-->
      <el-dialog title="修改生活会" :visible.sync="editFormVisible">
        <el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm">
          <el-form-item label="标题" prop="Name">
            <el-input v-model="editForm.Name" auto-complete="off" style="width:300px;"></el-input>
          </el-form-item>
          <el-form-item label="年度" prop="TheYear">
            <el-select v-model="editForm.TheYear" placeholder="请选择" style="width:100px;">
              <el-option v-for="index of 10" :label="2020+index" :key="'edit'+(2020+index)" :value="2020+index"></el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click.native="editFormVisible = false">取消</el-button>
          <el-button type="primary" @click.native="editFormSubmit" :loading="editLoading">提交</el-button>
        </div>
      </el-dialog>
    </section>
  </div>
</div>
</template>

<script>
export default {
  data () {
    return {
      unitName: '',
      shhAuth: '',
      fileList: [],
      importVisible: false,
      saveLoading: false,
      ipVisible: false,
      ipForm: {
        username: '',
        ip: ''
      },
      ipFormRules: {
        username: [
          { required: true, message: '请输入登录名', trigger: 'blur' }
        ],
        ip: [
          { required: true, message: '请输入IP', trigger: 'blur' }
        ]
      },
      passVisible: false,
      passForm: {
        username: ''
      },
      passFormRules: {
        username: [
          { required: true, message: '请输入登录名', trigger: 'blur' }
        ]
      },
      theYear: null,
      yearList: [],
      btnLoading: false,
      tableHeight: 100,
      maxId: 0,
      isAdmin: true, // 临时调整为true
      isChuzhang: false,
      editVisible: false,
      editBtnsVisible: true,
      shhlist: [],
      listLoading: false,
      totalnum: 0,
      addFormVisible: false, // 新增界面是否显示
      addLoading: false,
      // 新增界面数据
      addForm: {
        Name: '',
        TheYear: ''
      },
      addFormRules: {
        Name: [
          { required: true, message: '请输入标题', trigger: 'blur' }
        ],
        TheYear: [
          { required: true, message: '请选择年度', trigger: 'blur' }
        ]
      },
      editFormRules: {
        Name: [
          { required: true, message: '请输入标题', trigger: 'blur' }
        ],
        TheYear: [
          { required: true, message: '请选择年度', trigger: 'blur' }
        ]
      },
      editFormVisible: false, // 编辑界面是否显示
      editLoading: false,
      // 编辑界面数据
      editForm: {
        Name: '',
        TheYear: '',
        Id: 0
      }
    }
  },
  methods: {
    uploaderror (err) {
      console.log('具体错误')
      console.log(err)
      this.$message({
        message: '导入失败:' + err,
        type: 'error'
      })
    },
    beforeAvatarUpload (file) {
      console.log('文件类型')
      console.log(file.name)
      const isFormat = file.name.indexOf('.xlsx') > 0
      // const isLt5M = file.size / 1024 / 1024 < 500
      if (!isFormat) {
        this.$message.error('上传文件只能是 .xlsx 格式!')
      }
      return isFormat
    },
    getImportList (res) {
      if (res.success) {
        this.$message({
          message: '导入成功！' + res.message,
          type: 'success'
        })
        this.importVisible = false
      } else {
        console.log(res.message)
        this.$message({
          message: '导入失败:' + res.message,
          type: 'error'
        })
      }
      this.fileList = []
    },
    importAllUserIp () {
      this.importVisible = true
    },
    exportAllUserIp () {
      var form = document.createElement('form')
      form.setAttribute('method', 'get')
      form.setAttribute('target', '_blank')
      form.setAttribute('action', this.$http.defaults.baseURL + 'shhuser/download')
      document.body.appendChild(form)
      form.submit()
      form.remove()
    },
    setUserIp () {
      this.ipForm.username = ''
      this.ipForm.ip = ''
      this.ipVisible = true
    },
    ipFormSubmit () {
      this.$refs.ipForm.validate((valid) => {
        if (valid) {
          this.saveLoading = true
          this.$http
            .post(`/shhuser/resetip`, {username: this.ipForm.username, ip: this.ipForm.ip})
            .then(response => {
              this.saveLoading = false
              if (response.data.success) {
                this.$message({
                  message: '操作成功',
                  type: 'success'
                })
              } else {
                this.$message({
                  message: '操作失败:' + response.data.message,
                  type: 'error'
                })
              }
            })
            .catch(error => {
              this.saveLoading = false
              console.log(error)
              this.$message({
                message: '网络操作失败:' + error,
                type: 'error'
              })
            })
          this.ipVisible = false
        }
      })
    },
    setUserPass () {
      this.passForm.username = ''
      this.passVisible = true
    },
    setAllUserPass () {
      this.$confirm('确定将全部用户密码批量重置为123456吗?', '提示', {
        type: 'success'
      }).then(() => {
        this.saveLoading = true
        this.$http
          .post(`/shhuser/resetallpassword`)
          .then(response => {
            this.saveLoading = false
            if (response.data.success) {
              this.$message({
                message: '操作成功',
                type: 'success'
              })
            } else {
              this.$message({
                message: '操作失败:' + response.data.message,
                type: 'error'
              })
            }
          })
          .catch(error => {
            this.saveLoading = false
            console.log(error)
            this.$message({
              message: '网络操作失败:' + error,
              type: 'error'
            })
          })
      })
    },
    passFormSubmit () {
      this.$refs.passForm.validate((valid) => {
        if (valid) {
          this.saveLoading = true
          this.$http
            .post(`/shhuser/resetpassword`, {username: this.passForm.username})
            .then(response => {
              this.saveLoading = false
              if (response.data.success) {
                this.$message({
                  message: '操作成功',
                  type: 'success'
                })
              } else {
                this.$message({
                  message: '操作失败:' + response.data.message,
                  type: 'error'
                })
              }
            })
            .catch(error => {
              this.saveLoading = false
              console.log(error)
              this.$message({
                message: '网络操作失败:' + error,
                type: 'error'
              })
            })
          this.passVisible = false
        }
      })
    },
    handleStart (id) {
      this.$confirm('确定要初始化并开启该民主生活会吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.btnLoading = true
        this.$http.post(this.$http.defaults.shenghuohuiAPI + `api/newFlow/saveStart`, {shenghuohuiId: id}).then(response => {
          console.log(response.data.success)
          if (response.data.success === true) {
            this.$message({
              message: '初始化成功',
              type: 'success'
            })
            this.btnLoading = false
            this.getShh()
          } else {
            this.$message({
              message: '初始化失败:' + response.data.message,
              type: 'error'
            })
            this.btnLoading = false
          }
        }).catch(error => {
          this.btnLoading = true
          console.log(error)
          this.$message({
            message: '初始化失败:' + error,
            type: 'error'
          })
          this.btnLoading = false
        })
      })
    },
    setState (id, state, title) {
      const stateText = state === 1 ? ' 开启 ' : ' 关闭 '
      this.$confirm('确定要' + stateText + ' 该民主生活会吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$http
          .get(this.$http.defaults.shenghuohuiAPI + 'api/newFlow/updateStatus?shenghuohuiId=' + id + '&status=' + state)
          .then(response => {
            if (response.data.success === true) {
              this.$message({
                message: stateText + '成功',
                type: 'success'
              })
              this.getShh()
            } else {
              console.log(stateText + '失败:' + response.data.message)
              this.$message({
                message: stateText + '失败:' + response.data.message,
                type: 'error'
              })
            }
          })
          .catch(error => {
            console.log(error)
          })
      })
    },
    inRoles (str) {
      let arr = JSON.parse(localStorage.getItem('Roles'))
      if (arr.indexOf(str) === -1) {
        return false
      } else {
        return true
      }
    },
    handleAuth () {
      this.$router.push({name: `ShenghuohuiAuth`})
    },
    shhshow (id, TheYear) {
      console.log(id)
      console.log(this.maxId)
      // if (id === this.maxId) {
      //   this.$router.push({name: `shenghuohuiList`})
      // } else {
      if (TheYear === 2021) {
        this.$router.push({name: `ShenghuohuiDetail`, params: {id: id}})
      } else if (TheYear >= 2022) {
        this.$router.push({name: `ShenghuohuiDetail2022`, params: {id: id}})
      }
      // }
    },
    shhshowold (id, TheYear) {
      this.$router.push({name: `ShenghuohuiDetailOld`, params: {id: id}})
    },
    showperson (id) {
      this.mypersonid = id
      console.log('mypersonid:' + this.mypersonid)
      this.showpersonVisible = true
    },
    editBtnsShow () {
      console.log(this.editVisible)
      this.editBtnsVisible = this.editVisible
    },
    // 获取用户列表
    getShh () {
      this.listLoading = true
      let url = this.$http.defaults.shenghuohuiAPI + `api/shenghuohui/list`
      if (this.theYear) {
        url = this.$http.defaults.shenghuohuiAPI + `api/shenghuohui/list?year=` + this.theYear
      }
      // var personParams = { Page: 0, Pagenum: 20, Personname: '', Unitkey: '', Sortkey: '', Isace: true, timestamp: new Date().getTime() }
      this.$http
        .get(url)
        .then(response => {
          this.listLoading = false
          if (response.data.success === true) {
            console.log('获取成功')
            this.shhlist = response.data.result
            // if (response.data.IsAdmin === false) {
            //   this.isAdmin = false
            //   if (!response.data.isChuzhang) {
            //     _this.isChuzhang = false
            //     _this.$router.replace('/shenghuohui/list')
            //   } else {
            //     _this.isChuzhang = true
            //     let ids = _this.shhlist.map(item => item.Id)
            //     _this.maxId = Math.max(...ids)
            //   }
            // } else {
            //   _this.isAdmin = true
            //   _this.editBtnsVisible = true
            // }
            console.log('获取总数:' + response.data.Msg)
            console.log('获取size:' + this.pagenum)
            this.totalnum = parseInt(response.data.Msg)
            if (!this.yearList.length) {
              this.yearList = [...new Set(this.shhlist.map(item => item.theYear))]
            }
          } else {
            console.log('获取失败:' + response.data.Msg)
            this.$message({
              message: '获取失败:' + response.data.Msg,
              type: 'error'
            })
          }
        })
        .catch(function (error) {
          console.log(error)
          this.$message({
            message: '获取失败:' + error,
            type: 'error'
          })
        })
    },
    // 显示新增界面
    handleAdd: function () {
      this.addFormVisible = true
      console.log('显示新增界面:' + this.addFormVisible)
      this.addForm = {
        title: '',
        year: ''
      }
    },
    // 显示编辑界面
    handleEdit: function (id) {
      let item = this.shhlist.find(item => item.id === id)
      if (item) {
        let objData = Object.assign({}, item)
        this.editForm.Name = objData.name
        this.editForm.Id = objData.id
        this.editForm.TheYear = objData.theYear
        this.editFormVisible = true
      }
    },
    // 新增
    addFormSubmit: function () {
      this.$refs.addForm.validate((valid) => {
        if (valid) {
          this.addLoading = true
          let para = {
            name: this.addForm.Name,
            theYear: this.addForm.TheYear
          }
          this.$http.post(this.$http.defaults.shenghuohuiAPI + `api/shenghuohui/add`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.$message({
                message: '提交成功',
                type: 'success'
              })
              this.$refs['addForm'].resetFields()
              this.addFormVisible = false
              this.addLoading = false
              this.getShh()
            } else {
              console.log('提交失败:' + response.data.Msg)
              this.$message({
                message: '提交失败:' + response.data.Msg,
                type: 'error'
              })
              this.addLoading = false
            }
          }).catch(function (error) {
            console.log(error)
            this.$message({
              message: '提交失败:' + error,
              type: 'error'
            })
            this.addLoading = false
          })
        }
      })
    },
    // 编辑
    editFormSubmit: function () {
      this.$refs.editForm.validate((valid) => {
        if (valid) {
          this.editLoading = true
          let TheYear = this.editForm.TheYear
          let para = {
            name: this.editForm.Name,
            theYear: TheYear,
            id: this.editForm.Id
          }
          this.$http.post(this.$http.defaults.shenghuohuiAPI + `api/shenghuohui/edit`, para).then(response => {
            console.log(response.data.success)
            if (response.data.success === true) {
              this.editLoading = false
              this.$message({
                message: '修改成功',
                type: 'success'
              })
              this.$refs['editForm'].resetFields()
              this.editFormVisible = false
            } else {
              this.editLoading = false
              console.log('修改失败:' + response.data.Msg)
              this.$message({
                message: '修改失败:' + response.data.Msg,
                type: 'error'
              })
            }
            this.getShh()
          }).catch(function (error) {
            this.editLoading = false
            console.log(error)
            this.$message({
              message: '获取失败:' + error,
              type: 'error'
            })
          })
        }
      })
    },
    // 删除
    handleDel: function (id) {
      this.$confirm('确认删除该记录吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true
        this.$http.get(this.$http.defaults.shenghuohuiAPI + `api/newFlow/removeShenghuohui?shenghuohuiId=` + id).then(response => {
          if (response.data.success === true) {
            this.addLoading = false
            this.$message({
              message: '删除成功',
              type: 'success'
            })
          } else {
            console.log('删除失败:' + response.data.message)
            this.$message({
              message: '删除失败:' + response.data.message,
              type: 'error'
            })
          }
          this.getShh()
        })
      })
    },
    tableresize (obj) {
      var clientHeight = 0
      if (document.body.clientHeight && document.documentElement.clientHeight) {
        clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
      } else {
        clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
      }
      obj.$nextTick(function () {
        if (this.inRoles('ROLE_shhadmin') || this.inRoles('ROLE_admin') || (this.shhAuth === '2' && this.unitName === '干部监督处')) {
          obj.tableHeight = clientHeight - 232
        } else {
          obj.tableHeight = clientHeight - 162
        }
      })
    }
  },
  mounted () {
    this.shhAuth = localStorage.getItem('shhAuth')
    this.unitName = localStorage.getItem('unitName')
    this.getShh()
    this.tableresize(this)
    let _this = this
    window.onresize = function windowResize () {
      // 通过捕获系统的onresize事件触发我们需要执行的事件
      _this.tableresize(_this)
    }
  }
}
</script>
<style>
  .wboxd .el-table th{
    font-weight: normal;
    background-image: linear-gradient(to bottom , #f8f8f8, #efefef);
  }
  .wboxd .el-table td, .el-table th{
    padding:0;
    font-size:var(--size14) !important;
    line-height: 20px;
    font-family: '宋体'
  }
  .tableth{
    background-image: linear-gradient(to bottom , #f8f8f8, #efefef);
    height:33px;
  }
  #testlist .wboxs{
    height:45px;
    padding-top:10px;
  }
  .el-table--border th, .el-table--border td {
    border-right: 1px solid #95B8E7;
  }
  .el-table th.is-leaf, .el-table td {
    border-bottom: 1px solid #95B8E7;
  }
  #Shenghuohui .el-table td{
    border-right: 1px solid #95B8E7;
    border-bottom: 1px solid #95B8E7;
  }

</style>
<style scoped>
  #shenghuohuiIndex h1{
    font-size:var(--size16) !important;
    font-weight: bolder;
    height: 30px;
    border-bottom: 1px solid #95B8E7;
    font-family: '宋体';
    line-height: 30px;
    color: #000;
    padding-left:10px;
    background-image: linear-gradient(to bottom , #EEF4FF, #E0ECFF);
    margin:0;
  }
  #shenghuohuiIndex .el-pagination{
    float: left;
    padding:7px 10px;
  }
  #shenghuohuiIndex .wboxs{
    padding:5px 15px;
    width: calc(100% - 30px);
    background: #fff;
    border: 1px solid #95B8E7;
    margin:0 10px;
    overflow: hidden;
  }
  #shenghuohuiIndex .wboxd{
    padding:0;
    width: calc(100% - 0px);
    background: #fff;
    border: 1px solid #95B8E7;
    margin:0 10px;
    overflow: hidden;
  }
</style>
